﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Entities;

namespace QuanLyTKB_TienDoGD.In
{
    public partial class frmInMonHoc : Form
    {
        public frmInMonHoc()
        {
            InitializeComponent();
        }

        private void frmInMonHoc_Load(object sender, EventArgs e)
        {

            this.reportViewerMonHoc.RefreshReport();
        }

        private void reportViewerMonHoc_Load(object sender, EventArgs e)
        {
            List<MonHoc> ds = MonHoc.Repository.GetAll().ToList();
            reportViewerMonHoc.LocalReport.DataSources.Clear();
            reportViewerMonHoc.LocalReport.ReportEmbeddedResource = "QuanLyTKB_TienDoGD.In.ReportMonHoc.rdlc";
            Microsoft.Reporting.WinForms.ReportDataSource dataset = new Microsoft.Reporting.WinForms.ReportDataSource("MonHoc", ds);
            reportViewerMonHoc.LocalReport.DataSources.Add(dataset);
            dataset.Value = ds;
            reportViewerMonHoc.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
            reportViewerMonHoc.LocalReport.Refresh();
            reportViewerMonHoc.RefreshReport();
            this.reportViewerMonHoc.RefreshReport();
        }
    }
}
